package com.xiaocheng.core.abstractfactory.factory;

import com.xiaocheng.core.abstractfactory.interfaces.ColorOfCar;
import com.xiaocheng.core.abstractfactory.interfaces.Shape;
import com.xiaocheng.core.abstractfactory.interfaces.impl.Circle;
import com.xiaocheng.core.abstractfactory.interfaces.impl.Square;

public class ShapeFactory extends CarFactory {

	@Override
	public ColorOfCar getColor(String color) throws Exception {

		return null;
	}

	@Override
	public Shape getShape(String shape) throws Exception {
		Shape shape1 = null;
		switch (shape) {
		case "circle":
			shape1 = new Circle();
			break;
		case "square":
			shape1 = new Square();
			break;

		default:
			shape1 = new Circle();
			break;
		}

		return shape1;
	}

}
